home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3s / ungetc.z / ungetc
Encoding:
Text File  |  2002-10-03  |  2.5 KB  |  67 lines

  1.  
  2.  
  3.  
  4. UUUUNNNNGGGGEEEETTTTCCCC((((3333SSSS))))                                                          UUUUNNNNGGGGEEEETTTTCCCC((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ungetc - push character back into input stream
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
  13.  
  14.      iiiinnnntttt uuuunnnnggggeeeettttcccc ((((iiiinnnntttt cccc,,,, FFFFIIIILLLLEEEE ****ssssttttrrrreeeeaaaammmm))));;;;
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      _u_n_g_e_t_c inserts the character _c into the buffer associated with an input
  18.      _s_t_r_e_a_m.  Pushed-back characters will be returned by subsequent reads on
  19.      that stream in the reverse order of their pushing.  A successful
  20.      intervening call (with the stream pointed to by _s_t_r_e_a_m) to a file
  21.      positioning function (_f_s_e_e_k(3S), _f_s_e_t_p_o_s(3S) or _r_e_w_i_n_d(3S)), discards any
  22.      pushed-back characters.  The external storage corresponding to the stream
  23.      is unchanged.  A successful call to _u_n_g_e_t_c clears the end-of-file
  24.      indicator for the stream.
  25.  
  26.      One character of pushback is guaranteed, provided something has already
  27.      been read from the stream and the stream is actually buffered.
  28.  
  29.      If _c equals EEEEOOOOFFFF, the operation fails and the input stream is unchanged.
  30.  
  31. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  32.      fseek(3S), fsetpos(3S), getc(3S), rewind(3S), setbuf(3S), stdio(3S).
  33.  
  34. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  35.      _u_n_g_e_t_c returns the character pushed back, or EEEEOOOOFFFF if it cannot insert the
  36.      character.
  37.  
  38. BBBBUUUUGGGGSSSS
  39.      When _s_t_r_e_a_m is _s_t_d_i_n, one character may be pushed back onto the buffer
  40.      without a previous read statement.
  41.  
  42.      An _u_n_g_e_t_c on an unbuffered stream (including _s_t_d_e_r_r) may succeed, with
  43.      the following consequences.  If the stream is open for input, the
  44.      pushed-back character will be prepended to the input.  If the stream is
  45.      open only for output, the next character written to the output stream may
  46.      be lost.
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.